//车辆信息js

var insertWin;//添加窗口
var editWin;//考核窗口
var excelWin;//导入Excel窗口
var busWin;//企业车辆列表窗口
var bfBusWin;//企业报废车辆列表窗口
var addBfReasonWin;//添加车辆报废原因窗口

//添加窗口
    insertWin=new Ext.Window({
        closeAction:'hide',
        title:'车辆基本信息录入表',
        width:800,
        contentEl:'tpanel06',
        buttonAlign:'center',
        buttons:[{text:'确定',handler:saveBusInfo},{text:'重置(R)',handler:windowReset},{text:'取消',handler:function(){
            insertWin.hide();
            document.getElementById("busInfoId").value="";
            document.getElementById("shjg").value="";
            windowReset();
        }}]
    });
    //导入Excel窗口
    excelWin=new Ext.Window({
        closeAction:'hide',
        title:'导入车辆信息',
        width:430,
        height:135 ,
        layout:'form',
        buttonAlign:'center',
        labelAlign:'right',
        items:[{
            xtype:'textfield',
            fileUpload: true, 
            fieldLabel:'请选择模板',
            name:'attach',
            inputType:'file'
        },{fieldLabel:"模版",html:"<a href='"+ctx+"/Templates/carinfo.xls'>下载</a>"}
        ],
        buttons:[{text:'保存',handler:impExcelHandler},{text:'取消',handler:function(){
            excelWin.hide();
        }}]
    });
    //考核窗口
    editWin=new Ext.Window({
        closeAction:'hide',
        title:'考核车辆信息',
        width:300,
        buttonAlign:'center',
        labelAlign:'right',
        layout:'form',
        contentEl:'tpanel07',
        buttons:[{text:'保存',handler:editBusInfo},{text:'取消',handler:function(){
            editWin.hide();
        }}]     
    });
    //企业车辆列表窗口
    busWin=new Ext.Window({
        closeAction:'hide',
        title:'车辆列表',
        width:800,
        height:490,
        align:'center',
        buttonAlign:'center',
        labelAlign:'right',
        layout:'form',
        contentEl:'tpanel08',
        buttons:[{text:'选择',handler:selectBusHander},{text:'取消',handler:function(){
            busWin.hide();
        }}]     
    });
	
	//企业报废车辆列表窗口
    bfBusWin=new Ext.Window({
        closeAction:'hide',
        title:'车辆列表',
        width:1000,
        height:550,
        align:'center',
        buttonAlign:'center',
        labelAlign:'right',
        layout:'form',
        contentEl:'tpanel08',
        buttons:[{text:'报废',handler:selectBfBusHander},{text:'取消',handler:function(){
            bfBusWin.hide();
        }}]     
    });
    
    //添加车辆报废原因窗口
    addBfReasonWin=new Ext.Window({
        closeAction:'hide',
        title:'添加报废原因',
        width:310,
        buttonAlign:'center',
        labelAlign:'right',
        layout:'form',
        contentEl:'tpanel07',
        buttons:[{text:'保存',handler:editBfBusInfo},{text:'取消',handler:function(){
            addBfReasonWin.hide();
        }}]     
    });
	
//根据企业id查找车辆信息
function findByQyid(pageNo2){
	var pageNo;
	if (typeof(pageNo2) == "undefined") { 
   		pageNo = 1;
	}else{
		pageNo = pageNo2;
	}
	document.getElementById("pageNo").value=pageNo;
    var ajid='${id}';
    if($("#hid").val()){
       ajid = $("#hid").val();
    }
    var qyid = $("#qyid").val();
    if(ajid!=''){
    	Ext.Ajax.request({
	      	url: '${ctx}/yw-yn-businfo!findPageByAjid.action',
	      	success:resultHandler,
	      	failure:faultHandler,
	    	params: {
	        	//ajid: ajid,
	         	qyid:qyid,
	         	pageNo:pageNo 
	       	}
    	});
    }else{
        document.getElementById("tpanel05").innerHTML="<br /><br /><b><p align='center'><font style='font-size:22px;'>企业车辆信息列表</font></p></b>";
    }
}

//修改车辆信息
function doUpdate(){
	var obj = document.getElementsByName("clSelect");//这个是以标签的name来取控件
	var flag = 0;
    for(i = 0;i < obj.length;i++){
		if(obj[i].checked){
			flag++;
        }
    }
    if(flag == 0){
    	alert("请选择一条记录！");
    }else if(flag > 1){
    	alert("请只选择一条记录！");
    }else{
    	for(i = 0;i < obj.length;i++){
			if(obj[i].checked){
			    var busInfoId = obj[i].value;
			    insertWin.show();
			    document.getElementById("busInfoId").value = busInfoId;
			    Ext.Ajax.request({
			    	url: '${ctx}/yw-yn-businfo!findById.action',
			     	success:seleteUpdateResult,
			     	failure:faultHandler,
			    	params: {busInfoId:busInfoId}
			    });
			    break;
			}
    	}
    }    
}

function seleteUpdateResult(result){
	
	var array = Ext.decode(result.responseText);
	if(typeof(array.cjh) != "undefined")
		document.getElementById("cjh").value = array.cjh;
	if(typeof(array.cphm) != "undefined")
		document.getElementById("cphm").value = array.cphm;
	if(typeof(array.zyzh) != "undefined")
		document.getElementById("zyzh").value = array.zyzh;
	if(typeof(array.zyzyxq) != "undefined")
		document.getElementById("zyzyxq").value = array.zyzyxqStr;
	if(typeof(array.cx) != "undefined")
		document.getElementById("cx").value = array.cx;
	if(typeof(array.ccrqStr) != "undefined")
		document.getElementById("ccrq").value = array.ccrqStr;
	if(typeof(array.djrqStr) != "undefined")
		document.getElementById("djrq").value = array.djrqStr;
	if(typeof(array.fdjh) != "undefined")
		document.getElementById("fdjh").value = array.fdjh;
	if(typeof(array.zzl) != "undefined")
		document.getElementById("zzl").value = array.zzl;
	if(typeof(array.gpsno) != "undefined")
		document.getElementById("gpsno").value = array.gpsno;
	if(typeof(array.remark) != "undefined")
		document.getElementById("remark").value = array.remark;
	if(typeof(array.xszyxrqStr) != "undefined")
		document.getElementById("xszyxrq").value = array.xszyxrqStr;	
	if(typeof(array.shjg) != "undefined")
		document.getElementById("shjg").value = array.shjg;	
	if(typeof(array.shr) != "undefined")
		document.getElementById("shr").value = array.shr;	
	if(typeof(array.shrqStr) != "undefined")
		document.getElementById("shrqStr").value = array.shrqStr;	
	//document.getElementById("qyid").value = array.qyid;	
	//document.getElementById("").value = array.;
	//document.getElementById("").value = array.;
	//document.getElementById("").value = array.;
	
	
	
}

//删除
function delSelect(){
	var obj = document.getElementsByName("clSelect");//这个是以标签的name来取控件
	var flag = 0;
    for(i = 0;i < obj.length;i++){
		if(obj[i].checked){
			flag = 1;
            break;
        }
    }
    if(flag == 0){
    	alert("请选择一条记录！");
    }
    if(flag == 1){
    	var r=confirm("确定要删除吗?");
    	if(r==true){
    		for(i = 0;i < obj.length;i++){
				if(obj[i].checked){
		            var busId = obj[i].value;
		            delBusInfo(busId);
		    	}
    		}
    	}   
    }
}


//判断全选还是全不选
function allSelectOrNoClSelect(){
	var aa = document.getElementById("allSelectClSelect").checked;
	if(aa == true){
		CheckedAllClSelect();
	}else{
		CheckedAllNoClSelect();
	}
}
//全选
function CheckedAllClSelect(){
 	//$('input[type="checkbox"][name="sqsx"]').attr("disabled","disabled");
  	//$(':checkbox').attr('checked','checked');
  	$('input[type="checkbox"][name="clSelect"]').attr('checked','checked');
 }

 //全不选
function CheckedAllNoClSelect(){
  	//$(':checkbox').attr('checked','');
  	$('input[type="checkbox"][name="clSelect"]').attr('checked','');
 }
 
 	//车辆检查表信息
function toCheckCar(pageNo2){
	var pageNo;
	if (typeof(pageNo2) == "undefined") { 
   		pageNo = 1;
	}else{
		pageNo = pageNo2;
	}
	document.getElementById("pageNo").value=pageNo;
    var ajid='${id}';
    if($("#hid").val()){
       ajid = $("#hid").val();
    }
    var qyid = $("#qyid").val();
    if(ajid!=''){
    	Ext.Ajax.request({
	      	url: '${ctx}/yw-yn-businfo!findPageByAjid.action',
	      	success:resultcheckCar,
	      	failure:faultHandler,
	    	params: {
	        	//ajid: ajid,
	         	qyid:qyid,
	         	pageNo:pageNo 
	       	}
    	});
    }else{
        document.getElementById("checkcar").innerHTML="<br /><br /><b><p align='center'><font style='font-size:22px;'>企业车辆信息列表</font></p></b>";
    }
}
 
//车辆检查表返回结果
function resultcheckCar(result){
	var pageNo = document.getElementById("pageNo").value;
	var prePageNo = parseInt(pageNo)-1;
	var nextPageNo = parseInt(pageNo)+1;
	var thisPageNo = parseInt(pageNo);
	var pageSize=10;
	var array = Ext.decode(result.responseText);
	var ajid=$("#hid").val();
	var checkDate=$("#checkDate").val();
	if(checkDate==""){
		checkDate=getNowDate(0);
	}
	var checkLeader=$("#checkLeader").val();
	var checkPerson=$("#checkPerson").val();
    var html='<table width="1000" border="0" cellspacing="2" cellpadding="2" align="center">';
    html+='<tr><td><table width="100%" border="0" cellspacing="2" cellpadding="2"> <tr><td height="55" bordercolor="#000000" align="center" style="font-size:22px;">';
    html+='<br /><b>企业车辆信息列表</b><br /><br/></td></tr></table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr>';
    html+='<td align="right"  height="25">';
    html+='</td></tr></table></td></tr><tr height="25"> <td><table width="100%" border="1" cellspacing="0" cellpadding="2" class="tpl_list_ui"><tr>';
    html+='<td width="5%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>序号</b></td>';
    html+='<td width="14%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>车辆牌号</b></td>';
    html+='<td width="14%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>行驶证</b></td>';
    //html+='<td width="14%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>道路运输证</b></td>';
    //html+='<td width="10%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>准运证有效期</b></td>';
    html+=' <td width="12%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>出厂日期</b></td>';
    html+='<td width="10%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>结论</b></td></tr>';
	
    for(var i=0;i<array.length;i++)
    //for(var i=pageNo-1;i<pageNo*pageSize;i++)
    {
	    html+='<tr align="center" height="25"><td>'+(i+1)+'</td><td>'+(array[i].cphm==null?"":array[i].cphm)+'</td><td>'+(array[i].cjh==null?"":array[i].cjh)+'</td><td>'+(array[i].fdjh==null?'':array[i].fdjh)+'</td><td>'+(array[i].xszyxrqStr==null?"":array[i].xszyxrqStr)+'</td><td>'+(array[i].xszyxrqStr==null?"":array[i].xszyxrqStr)+'</td><td>'+(array[i].shjg==null?"":array[i].shjg)+'</td>';
	    html+='</tr>';
    }
    
    var arrayLength=array.length;
    if(arrayLength > 0){//记录大于10条，则分页
    	var totalPage = array[0].pageCount;//总页数
    	var totalCount = array[0].totalCount;//总条数
    	if(prePageNo < 1){
    		prePageNo = 1;
    	}
    	if(nextPageNo > totalPage){
    		nextPageNo = totalPage;
    	}
    	document.getElementById("pageNo").value=totalPage;
    	var pageCount = (arrayLength%pageSize == 0 ? arrayLength/pageSize : Math.ceil(arrayLength/pageSize));
    	html+='<tr><td height="25" align="center" colspan="7">合计：合格：辆，不合格：辆&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="toCheckCar(1)">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="toCheckCar('+prePageNo+')">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="toCheckCar('+nextPageNo+')">下一页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#"  onclick="toCheckCar('+array[0].pageCount+')">尾页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第'+thisPageNo+'页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;共'+totalPage+'页'+totalCount+'条记录</td></tr>';
    }
     html+='<tr><td colspan="7">&nbsp;</td></tr>';
    html+='<tr><td height="25" align="left" colspan="7">&nbsp;&nbsp;&nbsp;&nbsp;带队领导：<input type="text" name="checkCarLeader" readonly="true" id="checkCarLeader" value="'+checkLeader+'"><input type="button" value="选择" onclick=selectUser("checkCarLeader")>&nbsp;&nbsp;检查人：<input type="text" name="checkPerson"  readonly="true" id="checkCarPerson" value="'+checkPerson+'"><input type="button" value="选择" onclick=selectUser("checkCarPerson")>';
    
    
    html+='&nbsp;&nbsp;检查时间：<input type="text" name="checkCarDate" id="checkCarDate"  format="yyyy年MM月dd日" onclick="WdatePicker()" readonly="true" value="'+checkDate+'"/> &nbsp;&nbsp;<input type="button" value="保存" onclick="saveCarInfo('+ajid+')"></input></td></tr>';
    
    html+='</table></td></tr><tr> <td></td> </tr><tr><td></td></tr></table>';
    
    document.getElementById("checkcar").innerHTML=html;
}

//保存车辆检查表
function saveCarInfo(ajid){
	var checkCarDate=document.getElementById("checkCarDate").value;
	var checkCarLeader=document.getElementById("checkCarLeader").value;
	var checkCarPerson=document.getElementById("checkCarPerson").value;
	    Ext.Ajax.request({
	    	method:'post',
	        url:'${ctx}/yw-yn-ljzyz-nsxz!saveCarCheckInfo.action',
	      	 params:{
	      	 id:ajid,
	        'checkDate':checkCarDate,
	        'checkPerson': checkCarPerson,
	        'checkLeader':checkCarLeader
      },
      	success:function(result){
	        if(result.responseText=="success"){
	        	alert("添加成功");
	        }else{
	        	alert("添加失败!");
	        }
      	},
      	scope:this
    });
	
}

//获取当前时间
function getNowDate(n){
	 var dateTime;
	  var myDate = new Date();
	  myDate.setDate(myDate.getDate()+n);   
	  var year = myDate.getFullYear()
	  var month = myDate.getMonth()+1;
	  var day = myDate.getDate();
	  if(month < 10)
	            month = "0"+month;
	  if(day < 10)
	            day = "0"+day;
	  var dateTime = year +"-"+month+"-"+ day ;
	return dateTime;
}

//选择人员	
function selectUser(id){	
	var url="${ctx}/yw-yn-jzfqwczc-jbxx!toSelectUser.action";		
	var userIds=window.showModalDialog(url,"","dialogWidth:650px;dialogHeight:360px"); 
	if(userIds!="" && userIds!=undefined){
	  document.getElementById(id).value=userIds;
	}
	
	//YwUtil.openWin({url: url, w: 620, h: 300});
}	
	

function resultHandler(result){
	var templateCode = document.getElementById("templateCode").value;
	var pageNo = document.getElementById("pageNo").value;
	var prePageNo = parseInt(pageNo)-1;
	var nextPageNo = parseInt(pageNo)+1;
	var thisPageNo = parseInt(pageNo);
	var pageSize=10;
	var array = Ext.decode(result.responseText);
	var ajid=$("#hid").val();
	var checkDate=$("#checkDate").val();
	if(checkDate==""){
		checkDate=getNowDate(0);
	}
	var checkLeader=$("#checkLeader").val();
	var checkPerson=$("#checkPerson").val();
    var html='<table width="950" border="0" cellspacing="2" cellpadding="2" align="center">';
    html+='<tr><td><table width="100%" border="0" cellspacing="2" cellpadding="2"> <tr><td height="55" bordercolor="#000000" align="center" style="font-size:22px;">';
    html+='<br /><b>企业车辆信息列表</b><br /><br/></td></tr></table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr>';
    html+='<td align="right"  height="25">';
    html+='</td></tr></table></td></tr><tr> <td><table width="100%" border="1" cellspacing="0" cellpadding="2" class="tpl_list_ui"><tr>';
    html+='<td width="4%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">';
    html+='<input type="checkbox" id="allSelectClSelect" name="allSelectClSelect" onclick="allSelectOrNoClSelect()"></td>';
    html+='<td width="5%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>序号</b></td>';
    html+='<td width="8%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>车辆牌号</b></td>';
    if("jzljczz_xzfz" != templateCode){//新增发证不用【准运证号】和【准运证有效期】
    	//html+='<td width="8%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>准运证号</b></td>';
    	//html+='<td width="12%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>准运证有效期</b></td>';
    }    
    html+='<td width="10%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>车辆架号</b></td>';
    html+='<td width="10%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>发动机号</b></td>';
    html+='<td width="7%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>载重量</b></td>';
    html+='<td width="12%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>出厂日期</b></td>';
    html+='<td width="12%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>有效日期</b></td>';
    //html+='<td width="8%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><b>有效期</b></td></tr>';
    //html+='<td  align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">操作</td></tr>';
	
    for(var i=0;i<array.length;i++)
    //for(var i=pageNo-1;i<pageNo*pageSize;i++)
    {
	    html+='<tr align="center"><td><input type="checkbox" name="clSelect" value='+array[i].id+'></td>';
	    html+='<td>'+(i+1)+'</td><td>'+(array[i].cphm==null?"":array[i].cphm)+'</td>';
	    if("jzljczz_xzfz" != templateCode){//新增发证不用【准运证号】和【准运证有效期】
		    //html+='<td>'+(array[i].zyzh==null?"":array[i].zyzh)+'</td>';
		    //html+='<td>'+(array[i].zyzyxqStr==null?"":array[i].zyzyxqStr)+'</td>';
	    }
	    html+='<td>'+(array[i].cjh==null?"":array[i].cjh)+'</td>';
	    html+='<td>'+(array[i].fdjh==null?'':array[i].fdjh)+'</td><td>'+(array[i].zzl==null?"":array[i].zzl)+'</td>';
	    html+='<td>'+(array[i].ccrqStr==null?"":array[i].ccrqStr)+'</td><td>'+(array[i].zyzyxqStr==null?"":array[i].zyzyxqStr)+'</td>';
	   // html+='<td>'+(array[i].shjg==null?"":array[i].shjg)+'</td>';
	    html+='</tr>';
    }
    
    var arrayLength=array.length;
    if(arrayLength > 0){//记录大于10条，则分页
    	var totalPage = array[0].pageCount;//总页数
    	var totalCount = array[0].totalCount;//总条数
    	if(prePageNo < 1){
    		prePageNo = 1;
    	}
    	if(nextPageNo > totalPage){
    		nextPageNo = totalPage;
    	}
    	document.getElementById("pageNo").value=totalPage;
    	var pageCount = (arrayLength%pageSize == 0 ? arrayLength/pageSize : Math.ceil(arrayLength/pageSize));
    	html+='<tr><td height="25" align="center" colspan="11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="findByQyid(1)">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="findByQyid('+prePageNo+')">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="findByQyid('+nextPageNo+')">下一页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#"  onclick="findByQyid('+array[0].pageCount+')">尾页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第'+thisPageNo+'页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;共'+totalPage+'页'+totalCount+'条记录</td></tr>';
    } 
    
    if("jzljczz_xzfz" != templateCode){//新增发证不用【带队领导】，【检查人】
		html+='<tr><td colspan="12">&nbsp;</td></tr>';
	    html+='<tr><td height="25" align="left" colspan="11">&nbsp;&nbsp;&nbsp;&nbsp;带队领导：<input type="text" name="checkCarLeader" readonly="true" id="checkCarLeader" value="'+checkLeader+'"><input type="button" value="选择" onclick=selectUser("checkCarLeader")>&nbsp;&nbsp;检查人：<input type="text" name="checkPerson"  readonly="true" id="checkCarPerson" value="'+checkPerson+'"><input type="button" value="选择" onclick=selectUser("checkCarPerson")>';
	    html+='&nbsp;&nbsp;检查时间：<input type="text" name="checkCarDate" id="checkCarDate"  format="yyyy年MM月dd日" onclick="WdatePicker()" readonly="true" value="'+checkDate+'"/> &nbsp;&nbsp;<input type="button" value="保存" onclick="saveCarInfo('+ajid+')"></input></td></tr>';
	}
    
    html+='</table></td></tr><tr> <td></td> </tr><tr><td></td></tr></table>';
    
    document.getElementById("tpanel05").innerHTML=html;
}

function faultHandler(){
    alert("获取数据失败!");
}


//保存车辆信息     
function saveBusInfo(){
	var ajid='${id}';
	if(ajid==null){
		alert("请先保存案件!");
		return;
	}
	if($("#hid").val()){
       ajid = $("#hid").val();
    }
	var gsmc = dwr.util.getValue('gsmc');
	var cjh = dwr.util.getValue('cjh');
	var cphm = dwr.util.getValue('cphm');
	var zyzh = dwr.util.getValue('zyzh');
	var zyzyxq = dwr.util.getValue('zyzyxq');
	var cx = dwr.util.getValue('cx');
	var ccrq = dwr.util.getValue('ccrq');
	var djrq = dwr.util.getValue('djrq');
	var fdjh = dwr.util.getValue('fdjh');
	var zzl = dwr.util.getValue('zzl');
	var gpsno = dwr.util.getValue('gpsno');
	var remark = dwr.util.getValue('remark');
	var qyid = dwr.util.getValue('qyid');
	var xszyxrq = dwr.util.getValue('xszyxrq');
	var shjg = dwr.util.getValue('shjg');
	/*//处理日期
	 if(ccrq != "null" && ccrq != "" && typeof(ccrq) != "undefined")
	 	ccrq = ccrq.replace("年","-").replace("月","-").replace("日","");
	 if(djrq != "null" && djrq != "" && typeof(djrq) != "undefined")
	 	djrq = djrq.replace("年","-").replace("月","-").replace("日","");
	 if(zyzyxq != "null" && zyzyxq != "" && typeof(zyzyxq) != "undefined")
	 	zyzyxq = zyzyxq.replace("年","-").replace("月","-").replace("日","");
	 if(xszyxrq != "null" && xszyxrq != "" && typeof(xszyxrq) != "undefined")
	 	xszyxrq = xszyxrq.replace("年","-").replace("月","-").replace("日","");
	 alert(ccrq);*/
	var obj;
	obj ={
	  ajid:ajid,
	  gsmc:gsmc,
	  cjh:cjh,
	  cphm:cphm,
	  zyzh:zyzh,
	  zyzyxq:zyzyxq,
	  xszyxrq:xszyxrq,
	  cx:cx,
	  ccrq:ccrq,
	  djrq:djrq,
	  fdjh:fdjh,
	  zzl:zzl,
	  gpsno:gpsno,
	  remark:remark,
	  shjg:shjg,
	  qyid:qyid
	};
	var url = '${ctx}/yw-yn-businfo!save.action';
	var busInfoId = dwr.util.getValue('busInfoId');
	if(busInfoId != "null" && busInfoId != "" && typeof(busInfoId) != "undefined"){
		url = '${ctx}/yw-yn-businfo!save.action?id='+busInfoId;
	}
  	var params=Ext.encode(obj);
    Ext.Ajax.request({
    	method:'post',
      	url:url,
      	params:{
        	'params': params
    },
      	success:function(result){
	        if(result.responseText=="success"){
		        insertWin.hide();
		        findByQyid();
		        if(busInfoId != "null" && busInfoId != "" && typeof(busInfoId) != "undefined"){
		        	alert("修改成功!");
		        }else{
		        	alert("添加成功!");
		        }
		        
		        //dwr.util.setValue('gsmc',"");
		        /*
		        var cjh = dwr.util.setValue('cjh',"");
		        var cphm = dwr.util.setValue('cphm',"");
		        var zyzh = dwr.util.setValue('zyzh',"");
		        var zyzyxq = dwr.util.setValue('zyzyxq',"");
		        var cx = dwr.util.setValue('cx',"");
		        var ccrq = dwr.util.setValue('ccrq',"");
		        var djrq = dwr.util.setValue('djrq',"");
		        var fdjh = dwr.util.setValue('fdjh',"");
		        var zzl = dwr.util.setValue('zzl',"");
		        var gpsno = dwr.util.setValue('gpsno',"");
		        var remark = dwr.util.setValue('remark',"");
		        */
		        windowReset();
		        document.getElementById("busInfoId").value="";
		        document.getElementById("shjg").value="";
	        }else{
	        	alert("添加失败!");
	        }
      	},
      	scope:this
    });

}

//重置新增窗口
function windowReset(){
	var cjh = dwr.util.setValue('cjh',"");
    var cphm = dwr.util.setValue('cphm',"");
    var zyzh = dwr.util.setValue('zyzh',"");
    var zyzyxq = dwr.util.setValue('zyzyxq',"");
    var xszyxrq = dwr.util.setValue('xszyxrq',"");
    var cx = dwr.util.setValue('cx',"");
    var ccrq = dwr.util.setValue('ccrq',"");
    var djrq = dwr.util.setValue('djrq',"");
    var fdjh = dwr.util.setValue('fdjh',"");
    var zzl = dwr.util.setValue('zzl',"");
    var gpsno = dwr.util.setValue('gpsno',"");
    var remark = dwr.util.setValue('remark',"");
    var shr = dwr.util.setValue('shr',"");
    var shrqStr = dwr.util.setValue('shrqStr',"");
    var shjg = dwr.util.setValue('shjg',"");
    var busInfoId = dwr.util.setValue('busInfoId',"");
}

//弹出新增窗口
function openInsertWin(){
    insertWin.show();
}

//导入车辆信息
function impExcelHandler(){
    var attache = dwr.util.getValue('attach');
    if (attache.value == '') { Ext.Msg.alert("提示!","请选择要上传的车辆信息表!");return; }
    var dotIndex = attache.value.lastIndexOf(".");
    if (dotIndex < 0) dotIndex = attache.value.length;
    var attacheName = attache.value.substring(attache.value.lastIndexOf("\\") + 1, dotIndex);
    var attacheType = attache.value.substring(dotIndex + 1);
    
    var ajid='${id}';
    if($("#hid").val()){
       ajid = $("#hid").val();
    }
    var qyid = $("#qyid").val();
    if(ajid==null){Ext.Msg.alert("提示!","请先保存案件!");return;}
    var gsmc2 = dwr.util.getValue('gsmc');
    FileUploadCntl.uploadBusinfo(qyid,ajid,gsmc2,attache, function (result){
    	var array = eval('(' + result + ')');
    	if(array.success == true){
			alert("导入成功!");
    	}else{
    		alert("导入失败!");
    	}
		findByQyid();
		//window.location.reload();
	});
}

//导入Excel   
function impExcel(){
    excelWin.show();
}

//批量审核
function doBatchAudit(){
	var obj = document.getElementsByName("clSelect");//这个是以标签的name来取控件
	var flag = 0;
    for(i = 0;i < obj.length;i++){
		if(obj[i].checked){
			flag = 1;
            break;
        }
    }
    if(flag == 0){
    	alert("请选择一条记录！");
    	return;
    }
    var busId = "";
    if(flag == 1){
   		for(i = 0;i < obj.length;i++){
			if(obj[i].checked){
	            busId = busId + "," + obj[i].value;
	            //delBusInfo(busId);
	            
	    	}
   		}  
    }
    if(busId != ""){
    	var html='<table  width="400"><tr><td align="right" width="100">车辆信息考核:</td><td>&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="通过" name="batchAuditShjg" value="通过" checked>通过&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="不通过" name="batchAuditShjg" value="不通过">不通过<!--<input type="text" name="shjg" value=""/>-->';
			html+='<input type="hidden" name="batchAuditBusInfoId" value="'+busId+'"></td></tr></table>';
	    document.getElementById("tpanel07").innerHTML=html;
	    editWin.show();
    }
}

//审核车辆信息
function editBusInfo(){
    var shjg = dwr.util.getValue('shjg');//单个审核
    if(shjg == ""){
    	shjg = dwr.util.getValue('batchAuditShjg');//批量审核
    }
    var busInfoId = dwr.util.getValue('busInfoId');//单个审核
    if(busInfoId == ""){
    	busInfoId = dwr.util.getValue('batchAuditBusInfoId');//批量审核
    }
    Ext.Ajax.request({
    	url: '${ctx}/yw-yn-businfo!edit.action?busInfoId='+busInfoId,
     	success:editResult,
     	failure:faultHandler,
        params: {/*busInfoId:busInfoId,*/
            shjg:shjg
        }
    });    
}

function editResult(){
    alert("审核成功!");
    findByQyid();
    editWin.hide();
}

//删除车辆信息
function delBusInfo(value){
    Ext.Ajax.request({
	    url: '${ctx}/yw-yn-businfo!delete.action',
	    success:delResult,
	    failure:faultHandler,
	    params: {busInfoId:value}
    });
}
function delResult(){
    findByQyid('1');
}

//考核车辆信息
function shBusInfo(value){
    Ext.Ajax.request({
    url: '${ctx}/yw-yn-businfo!findById.action',
     	success:findResult,
     	failure:faultHandler,
    	params: {busInfoId:value}
    });
    
}
function findResult(result){
    var array = Ext.decode(result.responseText);
    var html='<table  width="400"><tr><td align="right" width="100">车辆信息考核:</td><td>&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="通过" name="shjg" value="通过" checked>通过&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" id="不通过" name="shjg" value="不通过">不通过<!--<input type="text" name="shjg" value="'+(array.shjg==null?'':array.shjg)+'"/>-->';
    html+='<input type="hidden" name="busInfoId" value="'+array.id+'"></td></tr></table>';

    document.getElementById("tpanel07").innerHTML=html;
    editWin.show();
    //初始化
    var flag = array.shjg;
    if(document.getElementById(flag))
        document.getElementById(flag).checked = true;
}

function selectBus(pageNo2){
	var pageNo;
	if (typeof(pageNo2) == "undefined") { 
   		pageNo = 1;
	}else{
		pageNo = pageNo2;
	}
	document.getElementById("pageNo").value=pageNo;
    var ajid='${id}';
    if($("#hid").val()){
       ajid = $("#hid").val();
    }
    var qyid = $("#qyid").val();
	Ext.Ajax.request({
      url: '${ctx}/yw-yn-businfo!findPageByAjid.action',
      success:selectBusSuccessHandler,
      failure:selectBusFaultHandler,
         params: {
         	ajid: ajid,
         	qyid:qyid,
         	pageNo:pageNo 
         }
    });
}

function selectBusSuccessHandler(result){
	var pageNo = document.getElementById("pageNo").value;
	var prePageNo = parseInt(pageNo)-1;
	var nextPageNo = parseInt(pageNo)+1;
	var thisPageNo = parseInt(pageNo);
	var pageSize=10;
	var array = Ext.decode(result.responseText);
    var html='<table width="700" border="0" cellspacing="2" cellpadding="2" align="center">';
    html+='<tr><td><table width="100%" border="0" cellspacing="2" cellpadding="2"> <tr><td height="55" bordercolor="#000000" align="center" style="font-size:22px;">';
    html+='<br /><b>车辆列表</b><br /></td></tr></table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr>';
    html+='<td align="right"  height="25"><!--<input type="button" value="新增" onclick="openInsertWin()"></input> <input type="button" value="导入" onclick="impExcel()"></input><input type="button" value="删除选中" onclick="delSelect()"></input>-->';
    html+='</td></tr></table></td></tr><tr> <td><table width="100%" border="1" cellspacing="0" cellpadding="2" class="tpl_list_ui"><tr>';
    html+='<td width="4%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><input type="checkbox" id="allSelectBusSelect" name="allSelectBusSelect" onclick="allSelectOrNoBusSelect()"></td><td width="5%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">序号</td><td width="14%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">车辆牌号</td> <td width="14%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">车辆架号</td>';
    html+='<td width="14%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">发动机号</td><td width="10%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">载重量</td>';
    html+=' <td width="12%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">出厂日期</td> <td width="12%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">登记日期</td><td width="10%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">审核结果</td></tr>';
	
    for(var i=0;i<array.length;i++)
    //for(var i=pageNo-1;i<pageNo*pageSize;i++)
    {
	    html+='<tr align="center"><td><input type="checkbox" name="busSelect" value='+array[i].id+'></td><td>'+(i+1)+'</td><td>'+(array[i].cphm==null?"":array[i].cphm)+'</td><td>'+(array[i].cjh==null?"":array[i].cjh)+'</td><td>'+(array[i].fdjh==null?'':array[i].fdjh)+'</td><td>'+(array[i].zzl==null?"":array[i].zzl)+'</td><td>'+(array[i].ccrqStr==null?"":array[i].ccrqStr)+'</td><td>'+(array[i].djrqStr==null?"":array[i].djrqStr)+'</td><td>'+(array[i].shjg==null?"":array[i].shjg)+'</td>';
	    html+='<!--<td><input type="button" value="审核" onclick="shBusInfo('+array[i].id+')">&nbsp;<input type="button" value="删除" onclick="delBusInfo('+array[i].id+')"></td>--></tr>';
    }
    
    var arrayLength=array.length;
    if(arrayLength > 0){//记录大于10条，则分页
    	var totalPage = array[0].pageCount;//总页数
    	var totalCount = array[0].totalCount;//总条数
    	if(prePageNo < 1){
    		prePageNo = 1;
    	}
    	if(nextPageNo > totalPage){
    		nextPageNo = totalPage;
    	}
    	document.getElementById("pageNo").value=totalPage;
    	var pageCount = (arrayLength%pageSize == 0 ? arrayLength/pageSize : Math.ceil(arrayLength/pageSize));
    	html+='<tr><td height="25" align="center" colspan="9">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="selectBus(1)">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="selectBus('+prePageNo+')">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="selectBus('+nextPageNo+')">下一页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#"  onclick="selectBus('+array[0].pageCount+')">尾页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第'+thisPageNo+'页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;共'+totalPage+'页'+totalCount+'条记录</td></tr>';
    }    
    html+='</table></td></tr><tr> <td></td> </tr><tr><td></td></tr></table>';
    
    document.getElementById("tpanel08").innerHTML=html;
    busWin.show();
}

function selectBusFaultHandler(){
	alert("出错了");
}

function selectBusHander(){
	var obj = document.getElementsByName("busSelect");//这个是以标签的name来取控件
	var flag = 0;
    for(i = 0;i < obj.length;i++){
		if(obj[i].checked){
			flag = 1;
            break;
        }
    }
    if(flag == 0){
    	alert("请选择一条记录！");
    }
    if(flag == 1){
    		for(i = 0;i < obj.length;i++){
				if(obj[i].checked){
		            var busId = obj[i].value;
		            selected(busId);
		    	}
    		} 
    }
}

//点击选择
function selected(value){	
	var spsx = $("#spsx").val();
    Ext.Ajax.request({
	    url: '${ctx}/yw-yn-businfo!updateBusSpsx.action',
	    success:selectedHandler,
	    failure:faultHandler,
	    params: {
	    	busInfoId:value,
	    	spsx:spsx	
	    }
    });
}

function selectedHandler(){
	busWin.hide();
	window.location.reload(); 
}

//判断全选还是全不选
function allSelectOrNoBusSelect(){
	var aa = document.getElementById("allSelectBusSelect").checked;
	if(aa == true){
		CheckedAllBusSelect();
	}else{
		CheckedAllNoBusSelect();
	}
}
//全选
function CheckedAllBusSelect(){
 	//$('input[type="checkbox"][name="sqsx"]').attr("disabled","disabled");
  	//$(':checkbox').attr('checked','checked');
  	$('input[type="checkbox"][name="busSelect"]').attr('checked','checked');
}

 //全不选
function CheckedAllNoBusSelect(){
  	//$(':checkbox').attr('checked','');
  	$('input[type="checkbox"][name="busSelect"]').attr('checked','');
}
 
 //选择报废车辆
function selectBfBus(pageNo2){
	var pageNo;
	if (typeof(pageNo2) == "undefined") { 
   		pageNo = 1;
	}else{
		pageNo = pageNo2;
	}
	document.getElementById("pageNo").value=pageNo;
    var ajid='${id}';
    if($("#hid").val()){
       ajid = $("#hid").val();
    }
    var qyid = $("#qyid").val();
	Ext.Ajax.request({
      	url: '${ctx}/yw-yn-businfo!findPageByAjid.action',
      	success:selectBfBusSuccessHandler,
      	failure:selectBfBusFaultHandler,
       	params: {
         	ajid: ajid,
         	qyid:qyid,
         	pageNo:pageNo 
        }
    });
}
//报废
function selectBfBusSuccessHandler(result){
	var pageNo = document.getElementById("pageNo").value;
	var prePageNo = parseInt(pageNo)-1;
	var nextPageNo = parseInt(pageNo)+1;
	var thisPageNo = parseInt(pageNo);
	var pageSize=10;
	var array = Ext.decode(result.responseText);
    var html='<table width="900" border="0" cellspacing="2" cellpadding="2" align="center">';
    html+='<tr><td><table width="100%" border="0" cellspacing="2" cellpadding="2"> <tr><td height="55" bordercolor="#000000" align="center" style="font-size:22px;">';
    html+='<br /><b>车辆列表</b><br /></td></tr></table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr>';
    html+='<td align="right"  height="25"><!--<input type="button" value="新增" onclick="openInsertWin()"></input> <input type="button" value="导入" onclick="impExcel()"></input><input type="button" value="删除选中" onclick="delSelect()"></input>-->';
    html+='</td></tr></table></td></tr><tr> <td><table width="100%" border="1" cellspacing="0" cellpadding="2" class="tpl_list_ui"><tr>';
    html+='<td width="4%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8"><input type="checkbox" id="allSelectBusSelect" name="allSelectBusSelect" onclick="allSelectOrNoBusSelect()"></td><td width="4%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">序号</td><td width="8%" height="25" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">车辆牌号</td> <td width="11%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">车辆架号</td>';
    html+='<td width="9%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">发动机号</td><td width="7%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">载重量</td>';
    html+=' <td width="9%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">出厂日期</td> <td width="9%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">登记日期</td><td width="10%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">报废原因</td>';
	html+='<td width="12%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">以旧换新指标数</td><td width="12%" align="center" bordercolor="#DBE1E5" bgcolor="#E7EEF8">&nbsp;</td></tr>';
    for(var i=0;i<array.length;i++)
    //for(var i=pageNo-1;i<pageNo*pageSize;i++)
    {
	    html+='<tr align="center"><td><input type="checkbox" name="bfBusSelect" value='+array[i].id+'></td><td>'+(i+1)+'</td><td>'+(array[i].cphm==null?"":array[i].cphm)+'</td><td>'+(array[i].cjh==null?"":array[i].cjh)+'</td><td>'+(array[i].fdjh==null?'':array[i].fdjh)+'</td><td>'+(array[i].zzl==null?"":array[i].zzl)+'</td><td>'+(array[i].ccrqStr==null?"":array[i].ccrqStr)+'</td><td>'+(array[i].djrqStr==null?"":array[i].djrqStr)+'</td><td><div id="bfyy'+array[i].id+'">'+(array[i].bfyy==null?"":array[i].bfyy)+'</div></td>';
	    html+='<!--<td><input type="button" value="审核" onclick="shBusInfo('+array[i].id+')">&nbsp;<input type="button" value="删除" onclick="delBusInfo('+array[i].id+')"></td>--><td>&nbsp;</td><td><input type="button" value="添加报废原因" onclick="addBfReason('+array[i].id+')"></td></tr>';
    }
    
    var arrayLength=array.length;
    if(arrayLength > 0){//记录大于10条，则分页
    	var totalPage = array[0].pageCount;//总页数
    	var totalCount = array[0].totalCount;//总条数
    	if(prePageNo < 1){
    		prePageNo = 1;
    	}
    	if(nextPageNo > totalPage){
    		nextPageNo = totalPage;
    	}
    	document.getElementById("pageNo").value=totalPage;
    	var pageCount = (arrayLength%pageSize == 0 ? arrayLength/pageSize : Math.ceil(arrayLength/pageSize));
    	html+='<tr><td height="25" align="center" colspan="11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="selectBfBus(1)">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="selectBfBus('+prePageNo+')">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="selectBfBus('+nextPageNo+')">下一页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#"  onclick="selectBfBus('+array[0].pageCount+')">尾页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;第'+thisPageNo+'页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;共'+totalPage+'页'+totalCount+'条记录</td></tr>';
    }    
    html+='</table></td></tr><tr> <td></td> </tr><tr><td></td></tr></table>';
    
    document.getElementById("tpanel08").innerHTML=html;
    bfBusWin.show();
}

function selectBfBusFaultHandler(){
	alert("出错了");
}
//报废
function selectBfBusHander(){
	var obj = document.getElementsByName("bfBusSelect");//这个是以标签的name来取控件
	var flag = 0;
	
    for(i = 0;i < obj.length;i++){
		if(obj[i].checked){
			flag = 1;
            break;
        }
    }
    if(flag == 0){
    	alert("请选择一条记录！");
    }
    if(flag == 1){
    		for(i = 0;i < obj.length;i++){
				if(obj[i].checked){
		            var busId = obj[i].value;
		            selectedBf(busId);
		    	}
    		} 
    }
}

//点击选择  报废
function selectedBf(value){	
	var spsx = $("#spsx").val();
    Ext.Ajax.request({
	    url: '${ctx}/yw-yn-businfo!updateBusSpsx.action',
	    success:selectedBfHandler,
	    failure:faultHandler,
	    params: {
	    	busInfoId:value,
	    	spsx:spsx	
	    }
    });
}

function selectedBfHandler(){
	bfBusWin.hide();
	window.location.reload(); 
}

//判断全选还是全不选
function allSelectOrNoBfBusSelect(){
	var aa = document.getElementById("allSelectBfBusSelect").checked;
	if(aa == true){
		CheckedAllBfBusSelect();
	}else{
		CheckedAllNoBfBusSelect();
	}
}
//全选
function CheckedAllBfBusSelect(){
 	//$('input[type="checkbox"][name="sqsx"]').attr("disabled","disabled");
  	//$(':checkbox').attr('checked','checked');
  	$('input[type="checkbox"][name="bfBusSelect"]').attr('checked','checked');
}

 //全不选
function CheckedAllNoBfBusSelect(){
  	//$(':checkbox').attr('checked','');
  	$('input[type="checkbox"][name="bfBusSelect"]').attr('checked','');
}
 
 //添加车辆报废原因
function addBfReason(value){
    Ext.Ajax.request({
    url: '${ctx}/yw-yn-businfo!findById.action',
     	success:findBusResult,
     	failure:faultHandler,
    	params: {busInfoId:value}
    });    
}
function findBusResult(result){
    var array = Ext.decode(result.responseText);
    var html='<table  width="350"><tr><td align="right" width="100">报废原因:</td><td>&nbsp;&nbsp;&nbsp;&nbsp;<textarea type="text" id="bfyy" name="bfyy">'+(array.bfyy==null?'':array.bfyy)+'</textarea><!--<input type="text" name="bfyy" value="'+(array.bfyy==null?'':array.bfyy)+'"/>-->';
    html+='<input type="hidden" name="busInfoId" value="'+array.id+'"></td></tr></table>';

    document.getElementById("tpanel07").innerHTML=html;
    addBfReasonWin.show();
}

//保存车辆报废原因
function editBfBusInfo(){
    var bfyy = dwr.util.getValue('bfyy');
    var busInfoId = dwr.util.getValue('busInfoId');
    Ext.Ajax.request({
    	url: '${ctx}/yw-yn-businfo!edit.action',
     	success:function(){
     		alert("添加成功!");
    		addBfReasonWin.hide();
    		var id = "bfyy"+busInfoId;
    		document.getElementById(id).innerHTML=bfyy;
     	},
     	failure:faultHandler,
        params: {busInfoId:busInfoId,
            bfyy:bfyy
        }
    });    
}

